import request from './request'

const baseURL = import.meta.env.VITE_API_URL
export const authAPI = {
  // 用户注册
  register(data) {
    return request.post(baseURL + '/users/register', {
      username: data.username,
      password: data.password,
      email: data.email
    })
  },

  // 用户登录
  login(data) {
    return request.post(baseURL + '/users/login', {
      email: data.email,
      password: data.password
    })
  }


}